package org.zhangsh.spring.importbeandefinitionregistrar;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.stereotype.Component;

/**
 * </p>
 *
 * @author zhangsh
 * @version 1.0.0
 * @since 2019-03-27
 */
//@Component
public class DemoImportBeanDefinitionRegistrar implements ImportBeanDefinitionRegistrar {

    public DemoImportBeanDefinitionRegistrar(){
        System.out.println("我是ImportBeanDefinitionRegistrar  init...");
    }

    @Override
    public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
        System.out.println("ImportBeanDefinitionRegistrar(DemoImportBeanDefinitionRegistrar)实例化");
    }
}
